home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / IDL / DragDrp.idl < prev    next >
Encoding:
Text File  |  1997-02-13  |  4.2 KB  |  164 lines  |  [TEXT/MPS ]

  1. //#    Copyright:    © 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  2.  
  3. #ifndef _DRAGDROP_
  4. #define _DRAGDROP_
  5.  
  6. #ifndef _ODOBJECT_
  7. #include "ODObject.idl"
  8. #endif
  9.  
  10. //=====================================================================================
  11. // Classes defined in this interface
  12. //=====================================================================================
  13.  
  14. interface  ODDragAndDrop;
  15.  
  16. //=====================================================================================
  17. // Classes used by this interface
  18. //=====================================================================================
  19.  
  20. interface    ODSession;
  21. interface    ODPart;
  22. interface    ODStorageUnit;
  23. interface    ODFacet;
  24. interface    ODFrame;
  25. interface    ODStorageSystem;
  26. interface    ODContainer;
  27. interface    ODWindow;
  28. interface    ODWindowState;
  29. interface    ODDragItemIterator;
  30. interface    ODStorageUnitView;
  31. interface    ODDraft;
  32.  
  33.  
  34.  
  35. //=====================================================================================
  36. // ODDragAndDrop
  37. //=====================================================================================
  38.  
  39.  
  40. interface ODDragAndDrop :  ODObject
  41. {
  42.     void Clear();
  43.     
  44.     ODStorageUnit  GetContentStorageUnit();
  45.     
  46.     ODDropResult StartDrag(in ODFrame srcFrame,
  47.                     in ODType imageType,
  48.                     in ODByteArray image,
  49.                     out ODPart destPart,
  50.                     in ODByteArray refCon);
  51.  
  52. #ifdef _PLATFORM_MACINTOSH_
  53.     ODBoolean ShowPasteAsDialog(
  54.                     in        ODBoolean                canPasteLink,
  55.                     in        ODPasteAsMergeSetting    mergeSetting,
  56.                     in        ODFacet                    facet,
  57.                     in        ODTypeToken                viewType,
  58.                     in        ODStorageUnit            contentSU,
  59.                     out        ODPasteAsResult            theResult);
  60.  
  61.     ODULong GetDragAttributes();
  62.     
  63.     ODPlatformDragReference GetDragReference();
  64.  
  65. // • Container Application support: CreateDragItemIterator
  66. //      Method used primarily by Container Application support to process a Platform drag reference and create
  67. //     an OpenDoc Drag item iterator. Used when a developer wants to process a drag itself without using the OpenDoc
  68. //     Drag Handlers. For example, Container Apps may want to embed a subset of the drag items as OpenDoc parts.
  69. //
  70. //    NOTE: This method was intended specifically for non-OpenDoc part support, particularly Container Application
  71. //     support, that may need to process a drag directly. Parts should NOT use this method. They should use the
  72. //  Drag&Drop protocol detailed in the OpenDoc Class Reference and Programmer's Guide. 
  73. //
  74. // Inputs: 
  75. //        dragRef: The platform drag reference to process. This reference will consist of N drag items.
  76. //        startDragItemRef: The number of the first Platform Drag Item to process.
  77. //        endDragItemRef:   The number of the last Platform Drag Item to process.
  78. // Output:
  79. //        ODDragItemIterator: An OpenDoc Drag Item iterator that contains all of the storage units for the 
  80. //                            input drag items in the Platform Drag Reference. This iterator will be similar to the
  81. //                            one passed to the ODPart Drag&Drop methods DragEnter, DragWithin, and DragLeave, and
  82. //                            identical if all of the Platform Drag Items are processed.
  83.  
  84.     ODDragItemIterator  CreateDragItemIterator( in ODPlatformDragReference dragRef, in ODULong startDragItemRef, 
  85.                                              in ODULong endDragItemRef);
  86.  
  87. #endif //# _PLATFORM_MACINTOSH_
  88.     
  89.  
  90.   
  91. #ifdef __SOMIDL__
  92. #ifdef _PLATFORM_MACINTOSH_
  93.     implementation
  94.     {
  95.         functionprefix = ODDragAndDrop;
  96.         override:
  97.             somUninit;
  98.             
  99.         releaseorder:
  100.             Clear,
  101.             GetContentStorageUnit,
  102.             StartDrag,
  103.             ShowPasteAsDialog,
  104.             GetDragAttributes,
  105.             GetDragReference,
  106.             CreateDragItemIterator,
  107.             reserved1,
  108.             reserved2,
  109.             reserved3,
  110.             reserved4,
  111.             reserved5,
  112.             reserved6,
  113.             reserved7,
  114.             reserved8,
  115.             reserved9,
  116.             reserved10,
  117.             reserved11,
  118.             reserved12,
  119.             reserved13,
  120.             reserved14,
  121.             reserved15,
  122.             reserved16,
  123.             reserved17,
  124.             reserved18,
  125.             reserved19,
  126.             reserved20,
  127.             reserved21,
  128.             reserved22,
  129.             reserved23,
  130.             reserved24,
  131.             reserved25,
  132.             reserved26,
  133.             reserved27,
  134.             reserved28,
  135.             reserved29,
  136.             reserved30,
  137.             reserved31,
  138.             reserved32,
  139.             reserved33;
  140.  
  141.             majorversion = 1; minorversion = 0;
  142.     
  143.             passthru C_h = 
  144.                 ""
  145.                 "#ifndef __DRAG__"
  146.                 "#include <Drag.h>"
  147.                 "#endif"
  148.                 "";
  149.  
  150.             passthru C_xh = 
  151.                 ""
  152.                 "#ifndef __DRAG__"
  153.                 "#include <Drag.h>"
  154.                 "#endif"
  155.                 "";
  156.                 
  157.  
  158. };
  159. #endif //# _PLATFORM_MACINTOSH_
  160. #endif //# __SOMIDL__
  161. };
  162.  
  163. #endif // _DRAGDROP_
  164.